package com.dayuanit.dy14.enter.dy14enter1024.mapper;

import com.dayuanit.dy14.enter.dy14enter1024.dto.GroupDTO;
import com.dayuanit.dy14.enter.dy14enter1024.entity.Group;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GroupMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Group record);

    int insertSelective(Group record);

    Group selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Group record);

    int updateByPrimaryKey(Group record);

    List<GroupDTO> listTop10Group();

    List<GroupDTO> listGroup(@Param("status") Byte status,
                             @Param("groupId") Integer groupId,
                             @Param("offset") Integer offset,
                             @Param("prePageNum") Integer prePageNum);
    int countGroup(@Param("status") Byte status,
                   @Param("groupId") Integer groupId);

    int updateGroupStatus(@Param("groupId")Integer groupId,
                          @Param("newStatus")Byte newStatus,
                          @Param("oldStatus")Byte oldStatus);
}